package com.sdk.util;

import android.database.Cursor;

public class CursorUtil {

	public static boolean cursorHaveValue(Cursor cursor) {
		return (null != cursor) && (cursor.getCount() > 0) && (cursor.getColumnCount() > 0);
	}
	
	public static boolean cursorHaveNoValue(Cursor cursor) {
		return (null == cursor) || (cursor.getCount() == 0) || (cursor.getColumnCount() == 0);
	}
	
	public static boolean cursorNeedClose(Cursor cursor) {
		return (null != cursor) && (!cursor.isClosed());
	}
	
	public static boolean cursorIsNull(Cursor cursor) {
		return (null == cursor);
	}
}
